From 02ee922969d797463375aded7d48cec45d18ec8f Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Wed, 23 Aug 2017 19:34:00 +0200 Subject: [PATCH] xen/arch/x86/time.c: let custom parameter parsing routines return errno Modify the custom parameter parsing routines in: xen/arch/x86/time.c to indicate whether the parameter value was parsed successfully. Signed-off-by: Juergen Gross Acked-by: Wei Liu Acked-by: Jan Beulich --- xen/arch/x86/time.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index b988b94d2e..eba7aed72d 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1870,7 +1870,7 @@ int hwdom_pit_access(struct ioreq *ioreq) * tsc=skewed: Assume TSCs are individually reliable, but skewed across CPUs. * tsc=stable:socket: Assume TSCs are reliable across sockets. */ -static void __init tsc_parse(const char *s) +static int __init tsc_parse(const char *s) { if ( !strcmp(s, "unstable") ) { @@ -1882,6 +1882,10 @@ static void __init tsc_parse(const char *s) setup_clear_cpu_cap(X86_FEATURE_TSC_RELIABLE); else if ( !strcmp(s, "stable:socket") ) tsc_flags |= TSC_RELIABLE_SOCKET; + else + return -EINVAL; + + return 0; } custom_param("tsc", tsc_parse); -- 2.30.2